import 'package:flutter/material.dart';
import 'package:website.home/documentation_page/presentation/theme/theme.dart';
import 'package:website.home/faq_page/presentation/theme/theme.dart';
import 'package:website.home/home_page/presentation/theme/theme.dart';
import 'package:website.home/signing_in_page/presentation/theme/theme.dart';
import 'package:website.home/signing_up_page/presentation/theme/theme.dart';
import 'package:website.home/web_purchase_item_page/presentation/theme/theme.dart';
import 'package:website.home.account/theme_provider.dart';

class HomeThemeProvider extends StatelessWidget {
  const HomeThemeProvider({
    required this.brightness,
    required this.primaryColor,
    required this.primaryContrastingColor,
    required this.child,
    Key? key,
  }) : super(key: key);

  final Brightness brightness;
  final Color primaryColor;
  final Color primaryContrastingColor;
  final Widget child;

  @override
  Widget build(BuildContext context) {
    return HomePageTheme(
      brightness: brightness,
      child: FaqPageTheme(
        brightness: brightness,
        child: DocumentationPageTheme(
          brightness: brightness,
          child: SigningUpPageTheme(
            brightness: brightness,
            primaryColor: primaryColor,
            primaryContrastingColor: primaryContrastingColor,
            child: SigningInPageTheme(
              brightness: brightness,
              primaryContrastingColor: primaryContrastingColor,
              child: WebPurchaseItemPageTheme(
                brightness: brightness,
                primaryContrastingColor: primaryContrastingColor,
                child: AccountThemeProvider(
                  brightness: brightness,
                  primaryColor: primaryColor,
                  primaryContrastingColor: primaryContrastingColor,
                  child: child,
                ),
              ),
            ),
          ),
        ),
      ),
    );
  }
}
